package com.eve.controller;

import com.eve.entity.Picture;
import com.eve.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Controller
public class PictureController1 {
@Autowired
private PictureService pictureService;


 @GetMapping("/imgshow")
    public String picture(Model model){
     List<Picture> pictures = pictureService.listPicture();
     model.addAttribute("pictures",pictures);
     System.out.println(pictures);
        return "imgshow";
    }
}

